Have the sxp parsing cope when the cpus field is a list, which can happen
authorEwan Mellor <ewan@xensource.com>
Thu, 25 Jan 2007 10:34:17 +0000 (10:34 +0000)
committerEwan Mellor <ewan@xensource.com>
Thu, 25 Jan 2007 10:34:17 +0000 (10:34 +0000)
after a reboot.

From Daniele Palumbo <daniele@retaggio.net>.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/python/xen/xend/XendConfig.py

index 07f76c01d9b171cb9c8f36ca36f3a2396fc01333..cdac1b433595f525101fb3391859f6b9dd5afa71 100644 (file)
@@ -572,7 +572,7 @@ class XendConfig(dict):
         #     "0-3,^1"   -> [0,2,3]
         #     "0-3,^1,1" -> [0,1,2,3]
         try:
-            if 'cpus' in cfg:
+            if 'cpus' in cfg and type(cfg['cpus']) != list:
                 cpus = []
                 for c in cfg['cpus'].split(','):
                     if c.find('-') != -1: